Hello Factorio players, lets start our developer to player interaction right now! :)
Merch store open again Klonan Our e-shop is now open again after taking a break over the holidays and new year. We have also restocked our new Factorio sew-on patches, so if you didn't manage to pick one up over the last weeks, now is your chance to order one.
Hey guys, here comes the weekly dose of Factorio-world information for you. We have crafted it just before we leave for a gdsession warm-up party. Gdsession is quite a big game development conference here in Prague. This is the first year we are going to participate. And actually tonight we will have a short (10 minutes) talk about what we do (well, about Factorio obviously).
The multiplayer megapacket Twinsen Last month I joined KatherineOfSky's MMO event as a player. I noticed that after we reached a certain number of players, every few minutes a bunch of them got dropped. Luckily for you (but unluckily for me), I was one of the players who got disconnected every, single. time, even though I had a decent connection. So I took the matter personally and started looking into the problem. After 3 weeks of debugging, testing and fixing, the issue is finally fixed, but the journey there was not that easy. Multiplayer issues are very hard to track down. Usually they only happen under very specific network conditions, in very specific game conditions (in this case having more than 200 players). Even when you can reproduce the issue it's impossible to properly debug, since placing a breakpoint stops the game, messes up the timers and usually times out the connection. But through some perseverance and thanks to an awesome tool called clumsy, I managed to figure out what was happening. The short version is: Because of a bug and an incomplete implementation of the latency state simulation, a client would sometimes end up in a situation where it would send a network package of about 400 entity selection input actions in one tick (what we called 'the megapacket'). The server then not only has to correctly receive those input actions but also send them to everyone else. That quickly becomes a problem when you have 200 clients. It quickly saturates the server upload, causes packet loss and causes a cascade of re-requested packets. Delayed input actions then cause more clients to send megapackets, cascading even further. The lucky clients manage to recover, the others end up being dropped. The issue was quite fundamental and took 2 weeks to fix. It's quite technical so I'll explain in juicy technical details below. But what you need to know is that since Version 0.17.54 released yesterday, multiplayer will be more stable and latency hiding will be much less glitchy (less rubber banding and teleporting) when experiencing temporary connection problems. I also changed how latency hiding is handled in combat, hopefully making it look a bit smoother.
Hello, so here we go with the last Friday Facts before the big day next Thursday. 0.12.23 The 0.12.23 is getting latest tweaks regarding the integration of Steam functionality for sharing saves for one account across different locations (different computers). In the meantime the majority of the dev team has been playtesting the game for past couple of days (and doing the usual "factory building shouting" across the office). Hopefully it will be out in the beginning of the next week. Steam page So the Steam page is up and running. We have uploaded the 0.12.22 and that (together with the page content) has been approved by the Steam review. The game is now listed in coming soon section. Things to check out: Updated existing trailer. The new gameplay trailer is hidden and will appear together with the game release (just to keep the expectations=)). New Factorio cover image (Albert is really proud of this one=)). A bunch of selected screenshots. As usual, we are open to ideas and recommendations in the comments on the forum=). Other Steam Stuff There is now a Steam FAQ page on the Factorio subreddit which contains a lot of useful information regarding the Steam release. We have had a betting round in the office what will the Factorio review percentage be in 1 week and 1 month after the EA release (so 2 numbers, i.e. [90, 86]). You are welcome to give your bets in the comments. We took down the Furnace Attendant tier from our webpage. The Mining Drill Operator is still available, because it adds stuff (name in the game, gfx wiki access) which will not be available after Steam release. There has been some discomfort on the forums about people overpaying on the Furnace Attendant tier (because Scenario Pack will be given for free alongside the basic game). We don't percieve this as an unfair treatment on our side. Still, we are thinking about ways how to provide some additional value / recognition to people who supported us by buying the higher tiers. In the middle of the finishing gfx craziness, Albert has spontaneously stopped shaving his beard. This has been going for long enough time to catch attention. I found the "idea" somehow compelling and joined him not so long ago. Though not impressive beards they are quite unusual for us. We might make a picture next Thursday=) There is still a possibility of Factorio release day coinciding with Kovarex's baby being born. New trains overview screen One of the new features in the 0.13 will be a new screen for viewing all the trains in the game. This one is invoked from the mini side menu mentioned in one of previous FFF. The screen basically shows every train depicted as a minimap and a train schedule below it. Trains will be ordered lexicographically based on the first station (also lexicographically) in their schedules (this should be the "expected" ordering - see trains sharing the stations close to each other). Schedules give hint about current station and whether the train is on the way / waiting in the station / in manual mode or without path. Also there is a search field which narrows the listing based on the stations in the schedule. Below is an example of the trains overview. Updated train screen We made some more updates to the existing single train screen. Namely adding the "open ttd" inspired preview of the train. There is a switchable "camera view" and "map view". Both are zoomable by scrolling the preview. Check out below how it looks in the game. We are also thinking about using this embedded minimap / camera views in other parts of the game. One straightforward example would be to have a camera entity (it could also be just existing radar entity). Then there would be a screen pretty much like the trains overview screen showing all the cameras and you could quickly check what is happening in different parts of the factory without physically going there. Or maybe another approach would be to allow player (with a special object in his armor?) view real-time any part of the map covered by radars. The non-surprising comments thread at our forums is waiting for your feedback.
Alpha blending and pre-multiplied alpha From time to time there is some confusion inside the team about how sprites are blended with the background when rendering, and what kind of effects we are able to achieve by tinting the sprites. So I (Posila) have decided to write up a few paragraphs about how alpha blending works (not only in Factorio), and what it means when someone talks about pre-multiplied alpha. When the GPU is figuring out what color it should draw on a particular pixel position, it runs a blending operation on just the computed pixel color and original color in the render target. There are several common blending operation modes (additive, multiplicative, overwrite, etc.), but the most common one used in Factorio is alpha blending. It calculates the resulting color using following equation (usually the new color is called 'source' and the background color that is being overwritten is called 'destination'): You can easily see that a source with alpha 0 will be fully transparent and the one with alpha 1 will be fully opaque. In games it is common to use a pre-multiplied alpha, which means the color channels of textures are stored in memory being already pre-multiplied by the alpha channel. Alpha blending with pre-multiplied alpha uses a simplified equation: Besides a slight performance gain from the GPU not having to do bunch of multiplication all the time, this equation allow us to do some extra effects we couldn't do without pre-multiplied alpha. Factorio renders sprites as colored polygons with texture. We usually refer to the color of a polygon as the 'tint', and every pixel of a sprite is multiplied with its tint. This is useful mainly for color masks, for example the diesel locomotive has a grayscale color mask which is tinted by the color it has set. Tints should have a pre-multiplied alpha too, but they don't have to, so we can use it to lie about the colors and alpha to the GPU. For example if we use tint {r=1,g=1,b=1,a=0} we can simplify previous equation even further and we get additive blending: This is great because that means we can switch between alpha and additive blending without having to change the blending state in graphics API, which would break sprite batching and result in an increase in the CPU cost of rendering. For some effects we use a tint with alpha between 0 and 1 heavily. This makes the result appear to be a combination of additive and alpha blending. For example, fire would eventually blend into a single solid color with pure additive blending, or would not look like it is emitting light with pure alpha blending. By using tint (1, 1, 1, 0.35) on the flame sprites, the brightness of overlapping flames adds up partially, but the flames don't completely lose their details. The same trick is used for smoke. Textures with pre-multiplied alpha also produce better results in texture filtering , which is probably the main reason why they are so widely used in the videogame industry.
Hello everyone past week has been a typical "not-that-much-interesting-is-happening" kind of a week here in the Wube office. Everyone is working on his continuous little sub projects. New and new bugs keep appearing in "should-have-been-stable-long-ago" 0.12 branch. The bugs are then fixed and the cycle continues. It is not easy to find interesting topics in times like these, however this week Robert has decided to share his pet project he has been busy with lately. Just to put things into perspective, Robert is the leader (and only member at the moment) of a subteam nick-named Factorio-X which is eXperimenting with pushing our engine to its limits.
Hello, this post is going to be more technical than usual, yet it might still be interesting to know the background of the process for some people.
Hello, once I changed the science packs for 0.15 , I had to do a playtest to have a feel of how the changes affect the game. I finished it just before writing this post: This was the first single player playthrough in a long time, so there was a lot of new findings. I also enjoyed all the new features, like blueprint book, auto trash, train conditions etc. These were little things but they helped a lot.